package com.swsc.xapp.model;


import com.swsc.xapp.enums.ColorEnums;
import com.swsc.xapp.enums.DefectStateEnums;

/**
 * @Author chencl
 * @Date 2021/8/13 22:45
 * @Version 1.0
 * @Description
 */
public class DefectMarkerResVO {
    private Integer id;

    private Long defectNo;

    private Integer organNo;
    private Integer stationNo;

    private String deviceCode;

    private String deviceName;

    private String faultName;

    private String patrolTime;

    private Float loss;

    private String state;

    private String stateName;

    private String remark;

    private Double longitude;

    private Double latitude;

    private String markColor;

    private String faultLevel;

    public String getMarkColor() {
        return DefectStateEnums.DEAL.getState().equals(this.state) ? ColorEnums.GREEN.getColor() : ColorEnums.RED.getColor();
    }

    public String getStateName() {
        return DefectStateEnums.getName(this.state);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Long getDefectNo() {
        return defectNo;
    }

    public void setDefectNo(Long defectNo) {
        this.defectNo = defectNo;
    }

    public Integer getOrganNo() {
        return organNo;
    }

    public void setOrganNo(Integer organNo) {
        this.organNo = organNo;
    }

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getFaultName() {
        return faultName;
    }

    public void setFaultName(String faultName) {
        this.faultName = faultName;
    }

    public String getPatrolTime() {
        return patrolTime;
    }

    public void setPatrolTime(String patrolTime) {
        this.patrolTime = patrolTime;
    }

    public Float getLoss() {
        return loss;
    }

    public void setLoss(Float loss) {
        this.loss = loss;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public void setStateName(String stateName) {
        this.stateName = stateName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public void setMarkColor(String markColor) {
        this.markColor = markColor;
    }

    public String getFaultLevel() {
        return faultLevel;
    }

    public void setFaultLevel(String faultLevel) {
        this.faultLevel = faultLevel;
    }

    public Integer getStationNo() {
        return null != stationNo ? stationNo : organNo;
    }

    public void setStationNo(Integer stationNo) {
        this.stationNo = stationNo;
    }
}
